<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
 
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>OUR_ SENDMAIL</title>

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="font-awesome/css/font-awesome.css" rel="stylesheet">
    <link href="css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="css/plugins/summernote/summernote.css" rel="stylesheet">
    <link href="css/plugins/summernote/summernote-bs3.css" rel="stylesheet">
    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <link href="css/pqm.css" rel="stylesheet">
    <script src="js/jquery.min.js"></script>
    </head>
	<style>
		.wrapper{
			height:800px;
		}
		.fadeInRight{
			height:500px;
		}
		.mail-text{
			height:350px;
		}
		.mail-body{}
		#mailContent:empty:before{
            content:attr(placeholder);
            font-size: 16px;
            color: #ccc;
        }
        #mailContent:focus{
            content:none;
        }
	
 .pqm {
      display:inline-block;float:left;
       
   }
 </style>
 
    <script type="text/javascript">
    $(document).ready(function() {  
  
var MaxInputs       = 8; //maximum input boxes allowed  
var InputsWrapper   = $("#InputsWrapper"); //Input boxes wrapper ID  
var AddButton       = $("#AddMoreFileBox"); //Add button ID  
  
var x = InputsWrapper.length; //initlal text box count  
var FieldCount=1; //to keep track of text box added  
  
$(AddButton).click(function (e)  //on add input button click  
{  
        
        if(x <= MaxInputs) //max input box allowed  
        {  
            FieldCount++; //text box added increment  
            //add input box  
            $(InputsWrapper).append('<div ><input class="btn btn-white btn-sm pqm" style="font-size:8px"  type="file" name="mytext[]" id="field_'+ FieldCount +'" value="Text '+ FieldCount +'"/><a href="#" class="removeclass"><input class="btn btn-white pqm" style="border-color:white;padding-left:0px" type="button" value="x"></a></div>'); 
               
            x++; //text box increment 
             
        }  
return false;  
});  
  
$("body").on("click",".removeclass", function(e){ //user click on remove text  
        if( x > 1 ) {  
                $(this).parent('div').remove(); //remove text box  
                x--; //decrement textbox  
        }  
return false;  
})   
  
});  
 
    </script>
<body >
<%
String host =(String)session.getAttribute("host");     
String username =(String) session.getAttribute("username");
String password = (String)session.getAttribute("password");
session.setAttribute("username", username);
session.setAttribute("password", password);
session.setAttribute("host", host);
System.out.println("jsp_send:username="+username+"  password="+password +"host:"+host);
%>
    <div >

        <div   class="gray-bg">
        <div class="row border-bottom">
        <nav class="navbar navbar-static-top white-bg" role="navigation" style="margin-bottom: 0">
        <div class="navbar-header">
            <span class="navbar-minimalize minimalize-styl-2 btn btn-primary" style=" margin-left:38px" >our邮箱 </span>
         </div>	
		
            <ul class="nav navbar-top-links navbar-right">
                <li>
                    <span class="m-r-sm text-muted welcome-message" style="font-size: 28px;font-family:jokerman; color: #8FB586"><strong>Hello,welcome to our emailbox!</strong>&nbsp;&nbsp;&nbsp;<%=username%>@arman.com</span>
                </li>
                 

                <li>
                    <a href="index.jsp">
                        <i class="fa fa-sign-out"></i> 退出
                    </a>
                </li>
            </ul>

        </nav>
        </div>

        <div class="wrapper wrapper-content">
        <div class="row">
            <div class="col-lg-3">
                <div class="ibox float-e-margins">
                    <div class="ibox-content mailbox-content">
                        <div class="file-manager">
                            
                          
                            <ul class="folder-list m-b-md" style="padding: 0">
                                <li><a href="mailbox.jsp?username=<%=username%>&password=<%=password%>"  style="font-size:17px;"> <i ></i>收件箱 </a></li>
                                  <li><a href="mailbox.html"  style="font-size: 17px; "> <i></i>发件箱</a></li>
                                <li><a href="mailbox.html" style="font-size: 17px; "> <i ></i>星标邮箱</a></li>
                                <li><a href="mailbox.html" style="font-size: 17px; "> <i></i>草稿箱</a></li>
                                <li><a href="mailbox.html" style="font-size: 17px; "> <i></i>垃圾箱</a></li>
                            <div class="space-25"></div>
							  <li><a  href="mail_compose.jsp" style="font-size: 20px; font-family:jokerman"><i></i><strong>Write Letter</strong></a></li>
                          </ul>
                            <div class="clearfix"></div>
                            <div class="space-25"></div>
                             <img src="img/p4.jpg" width="270" height="230" alt=""/>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="col-lg-9 animated fadeInRight">
              <div class="mail-box-header">
               
                <div class="pull-right tooltip-demo"> <a href="mailbox.html" class="btn btn-white btn-sm">
                <i class="fa fa-pencil"></i>存草稿</a> <a href="mailbox.jsp?username=<%=username%>&password=<%=password%>" class="btn btn-danger btn-sm" 
                 ><i></i>取消 </a>
                 </div>
                <h2> WRITE YOUR EMAILS  </h2>
              </div>
              <div class="mail-box">
                <div class="mail-body">
               
                   <form class="form-horizontal" method="post" action="servlet/DoSend"  >
                    <div class="form-group">
                      <label class="col-sm-2 control-label">收件人:</label>
                      <div class="col-sm-10">
                        <input name="to" type="text" value="address" class="form-control" required>
                      </div>
                    </div>
                    <%System.out.println("in form"); %>
                    <div class="form-group">
                      <label class="col-sm-2 control-label">主题:</label>
                      <div class="col-sm-10">
                        <input name="subject" type="text" value="subject" class="form-control" required >
                       </div>
                      </div>
                        <div id="InputsWrapper">  </div> 
                         <textarea name="body" style="margin-left:0px; width:100%;color:inherit;height:180px"> </textarea>
                    <div class="clearfix"></div>
     		                <div class="mail-body text-right tooltip-demo" style="padding-right:0px"> 
	 		                <button  class="btn btn-sm btn-primary" 
	                    data-toggle="tooltip" data-placement="top" type="submit" value="sender" name="op">
	                     <i class="fa fa-reply"></i>发送
	                    </button>
                 <a href="mailbox.jsp?username=<%=username%>&password=<%=password%>" class="btn btn-primary btn-sm" ></i>取消</a>
                  <a href="mailbox.html" class="btn btn-primary btn-sm" >存草稿</a> </div>
		                 </form>
                 </div> 
                 
                  </div>
                <div class="clearfix"></div>
               
                </div>
               
                
              </div>
              
            </div>
        </div>
         
        
         <%System.out.println("form end"); %>
   
    <!-- Mainly scripts -->
    <script src="js/jquery-2.1.1.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>

    <!-- Custom and plugin javascript -->
    <script src="js/inspinia.js"></script>
    <script src="js/plugins/pace/pace.min.js"></script>

    <!-- iCheck -->
    <script src="js/plugins/iCheck/icheck.min.js"></script>

    <!-- SUMMERNOTE -->
    <script src="js/plugins/summernote/summernote.min.js"></script>
    <script>
        $(document).ready(function(){
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });


            $('.summernote').summernote();

        });
        var edit = function() {
            $('.click2edit').summernote({focus: true});
        };
        var save = function() {
            var aHTML = $('.click2edit').code(); //save HTML If you need(aHTML: array).
            $('.click2edit').destroy();
        };

    </script>
	 

</body>
<div >
            <div style=" text-align:center">
                <strong></strong> 电子邮箱@软件1401班
            </div>
        </div>
</html>
